<!-- 首页 -->
<template>
    <div class="index">
        <!-- 广告 -->
        <Ment></Ment>
        <!-- logo -->
        <Logo></Logo>
        <!--  轮播图 -->
        <Swiper></Swiper>
        <!-- 类型选择 -->
        <Selection :listImg="listImg"></Selection>
        <!-- 列表广告 -->
        <Listimg></Listimg>
        <!-- 送恋人鲜花 -->
        <Onelist :listData="lr"></Onelist>
        <!-- 送长辈鲜花 -->
        <Onelist :listData="zb"></Onelist>
        <!-- 永生花 -->
        <Twolist :listData="ysh"></Twolist>
        <!-- 蛋糕 -->
        <Twolist :listData="dg"></Twolist>
        <!-- 礼品精选 -->
        <Twolist :listData="lpjx"></Twolist>
        <!-- 巧克力精选 -->
        <Twolist :listData="qkl"></Twolist>
        <!-- 保障 -->
        <Guarantee :footerImg="footerImg"></Guarantee>
        <!-- 页脚 -->
        <Footer></Footer>
    </div>
</template>
<script>
import Ment from './components/Ment.vue'//广告
import Logo from './components/Logo.vue'//logo
import Swiper from './components/Swiper.vue'//轮播图
import Selection from './components/Selection.vue'//类型选择
import Listimg from './components/Listimg.vue'//列表广告
import Onelist from './components/Onelist.vue'//第一种列表
import Twolist from './components/Twolist.vue'//第二种列表
import Guarantee from './components/Guarantee.vue'//保障
import Footer from './components/Footer.vue'//页脚
export default {
    name: "index",
    data() {
        return {
            listImg: [],//类型选择
            lr: {},//恋人
            zb: {},//长辈
            ysh: {},//永生花
            dg: {},//蛋糕
            lpjx: {},//礼品精选
            qkl: {},//巧克力
            footerImg: [],//页脚数据
        }
    },
    components: {
        Ment,//广告
        Logo,//logo
        Swiper,//轮播图
        Selection,//类型选择
        Listimg,//列表广告
        Onelist,//第一种列表
        Twolist,//第二种列表
        Guarantee,//保障
        Footer,//页脚
    },
    created() {
        this.$axios.get('/api/list').then(res => {
            this.listImg = res.data.data.listImg
            this.lr = res.data.data.index.lr
            this.zb = res.data.data.index.zb
            this.ysh = res.data.data.index.ysh
            this.dg = res.data.data.index.dg
            this.lpjx = res.data.data.index.lpjx
            this.qkl = res.data.data.index.qkl
        })
    }
}
</script>

